Skip to main content

All Questions

4votes
2answers
192views

Abundant number implementation

I have implementted a simple JavaScript function to find the list of abundant numbers and print them on the screen. an abundant number is a number for which the sum of its proper divisors is greater ...
Napoleon Bonaparte's user avatar
1vote
1answer
140views

Transform an array into object and set index for an unique key in javascript

I have a method that merges keys and indexes from an array into an object. I'm stuck with ways to compress this method, and I don't know what I can do to make it simpler. Goal get an array of objects ...
wittgenstein's user avatar
4votes
2answers
3kviews

Download entire localStorage as file

I would like to download the entire contents from localStorage to a json file (in a "clear" formatting). I've tried this and it works perfectly. However, ...
Gibberish's user avatar
0votes
2answers
84views

Processing list of users- filtering out from refused list

The code below takes a list of users and displays two lists Refused users Admitted users Sample output: Refuse: Phil, Lola. Admit: Chris, Anne, Colin, Terri, Sam, Kay, Bruce. Any feedback is ...
Elbasel's user avatar
-2votes
2answers
111views

Getting items that have more than one entry in the array with optimized code

...
PDHide's user avatar
11votes
4answers
3kviews

Restructuring JSON to create a new JSON where properties are grouped according to similar values

I have a JSON structure in the following example format: ...
fruitlessartery's user avatar
3votes
2answers
142views

Cyclomatic Complexity (complexity)

I have a program for finding shortest distance/path and I got a correct answer but I am getting an issue i.e., "Function 'shortestPath' has a complexity of 9. Maximum allowed is 6." This is ...
L.Nyamagoud's user avatar
7votes
3answers
1kviews

Counting words from stored .md files

The following searches recursively for all the mark down files - i. ending with the extension .md - inside a folder. It then stores the text of the files in an ...
wyc's user avatar
  • 555
6votes
4answers
3kviews

Convert minutes portion of time to decimal

I am making an hours calculator app. It takes a start time, end time and time taken for lunch. For the start and end time it takes a four-digit hh:mm time. For example: 10:20. I have made a function ...
Ruari Douglas's user avatar
13votes
5answers
3kviews

Vue.js search functionality

In my BlogList.vue component I made a search input field: ...
meez's user avatar
  • 241
5votes
1answer
1kviews

Program for calculating and ranking scores

I've recently completed a vanilla JS challenge . It is a method for calculating and ranking scores. If possible, I would love to make it better. Any suggestions are welcome. Challenge Directions: The ...
gracie catherine's user avatar
6votes
4answers
3kviews

Find all letter Combinations of a Phone Number

The task is taken from LeetCode Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to letters (just ...
thadeuszlay's user avatar
2votes
1answer
758views

Given time intervals determine if a person could attend all meetings

The task is taken from LeetCode Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] ...
thadeuszlay's user avatar
8votes
1answer
2kviews

Merge Intervals in JavaScript

This is a task taken from Leetcode - Given a collection of intervals, merge all overlapping intervals. Example 1: ...
thadeuszlay's user avatar
7votes
1answer
4kviews

Given a string containing just parentheses, determine if the input string is valid

The task is taken from leetcode Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: ...
thadeuszlay's user avatar

153050per page
close